<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>

<script>
    var name=prompt("输入你喜欢的明星");
    if (name=="刘亦菲"){
        document.write("<img src='liuyifei.jpg'>")

    }else    if (name=="胡歌"){
        document.write("<img src='huge.jpg'>");

    }else    if (name==""){
        document.write("<img src=''>");

    }else    if (name=="刘诗诗"){
        document.write("<img src='liushishi.jpg'>");

    }
</script>
</html>